<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.prime.com.tr/ui">
<h:head>
        <title>Login</title>
</h:head>
<h:body>
        <ui:composition template="template/common/commonLayout.xhtml">
                <ui:define name="content">
                        <h:form prependId="false">
                                <p:panel id="panel" header="Login" style="margin-bottom:10px;">
                                        <p:messages />
                                        <h:panelGrid columns="3">
                                                <h:outputLabel for="username" value="#{msg.userName}" />
                                                <h:inputText id="username" value="#{springLoginBean.username}"
                                                        required="true" label="#{msg.userName}" />
                                                <p:message for="username" style="color:red" />
                                                <h:outputLabel for="password" value="#{msg.password}" />
                                                <h:inputSecret  id="password" value="#{springLoginBean.password}"
                                                        required="true" label="#{msg.password}" />
                                                <p:message for="password" style="color:red" />
                                                <h:outputLabel for="rememberMe" value="#{msg.rememberMe}" />
                                                <h:selectBooleanCheckbox id="rememberMe"
                                                        value="#{springLoginBean.rememberMe}" /> 
                                                <f:facet name="footer">
                                                        <p:commandButton update="panel"
                                                                action="#{springLoginBean.login}" ajax="false" value="Login" />
                                                        <p:commandButton immediate="true" ajax="false" id="index"
                                                                value="Cancel" action="template/common/commonLayout" />
                                                        <p:commandButton immediate="true" ajax="false" id="reg"
                                                                value="Registration" action="/registration.xhtml" />
                                                </f:facet>
                                                <br />
                                                <br />
                                        </h:panelGrid>
                                </p:panel>

                        </h:form>
                </ui:define>
        </ui:composition>
</h:body>
</html>
